/**
 * 
 */
package org.braketester.model;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.nio.DoubleBuffer;

import org.extdev.connection.Connection;
import org.extdev.device.ltr.LTR212LibDevice;
import org.extdev.libraries.ltr.LTRException;
import org.extdev.protocol.Protocol;

/**
 * @author LAP
 *
 */
public class LTR212ThreadRequestedDevice extends LTR212LibDevice {
	
	private ObjectInputStream objectInputStream;
	
	public LTR212ThreadRequestedDevice(Connection connection, Protocol protocol) throws LTRException {
		super(connection, protocol);
		objectInputStream = (ObjectInputStream)protocol.getInputStream();
	}
	
	public DoubleBuffer getData() throws ClassNotFoundException, IOException {
		return (DoubleBuffer) objectInputStream.readObject();
	}
}
